package src.epat.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import src.epat.mapper.EnvMapper;
import src.epat.model.EnvModel;

import java.util.List;

@Service
public class EnvService {

    @Autowired
    EnvMapper envMapper;

    public void addEnv(String name) {
        EnvModel envModel = new EnvModel();
        envModel.setName(name);
        envMapper.insert(envModel);
    }

    public void del(Long id) {
        envMapper.deleteById(id);
    }

    public List<EnvModel> list() {
        return envMapper.selectList(null);
    }

}
